﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Clien_News : System.Web.UI.Page
{
    Service.Service s;
  
    protected void Page_Load(object sender, EventArgs e)
    {
        s = new Service.Service();
        view();
       
    }
    public void view()
    {

        CollectionPager.MaxPages = 10000;

        CollectionPager.PageSize = 5; // số items hiển thị trên một trang

        CollectionPager.DataSource = s.ShowNews();

        CollectionPager.BindToControl = Repeater1;

        Repeater1.DataSource = CollectionPager.DataSourcePaged;

        Repeater1.DataBind();
       
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        if (Session["Student"] == null)
        {
            Response.Redirect("LoginStudent.aspx");
        }
        else
        {
            Response.Redirect("ListSubject.aspx");
        }

    }
 
}